#ifndef _TASKQUEUE_H_
#define _TASKQUEUE_H_

#include <queue>
using std::queue;

#include "Cond.h"
#include "Noncopyable.h"

class TaskQueue : public Noncopyable
{
    public:
        TaskQueue(int queSize = 10);
        ~TaskQueue();

        void push(const int& elem);
        void pop();

        bool empty() const;
        bool full() const;
    private:
        MutexLock _mutex;
        Cond _notFull;
        Cond _notEmpty;
        std::queue<int> _que;
        int _queSize;
};

#endif
